﻿package
{
	import flash.utils.getTimer;
	
	public class PerformanceTester
	{
		//VARIABLES INTERNAS SETEABLES.
		public var onCompleteHandler:Function = null;
		
		//VARIABLES INTERNAS.
		private var time:Number;
		private var dummy:Number;
		public var result:Number;
		
		//CONSTRUCTOR.
		public function PerformanceTester()
		{
			
		}
		
		//TESTS.
		
			//1.
			public function simpleTest()
			{
				time = getTimer();
				for(var i:uint; i<1000000; i++)
					dummy = Math.random();
				result = getTimer() - time;
				onCompleteHandler();
			}
	}
}